<template>
  <el-dialog v-model="visible" title="温馨提示" width="300px" append-to-body>
    <span>确定要切换计费方式吗？此操作将清空当前的收费标准内容</span>
    <template #footer>
      <div class="dialog-footer">
        <el-button
          @click="
            () => {
              visible = false;
            }
          "
          >取消</el-button
        >
        <el-button type="primary" @click="onchangeChargingDialog"> 确认 </el-button>
      </div>
    </template>
  </el-dialog>
</template>
<script setup>
import { ref } from "vue";

const visible = ref(false);
const emits = defineEmits(["changeCharging"]);

const init = () => {
  visible.value = true;
};
const onchangeChargingDialog = () => {
  visible.value = false;
  emits("changeCharging");
};

defineExpose({
  init,
});
</script>
